// yarn add react-router-dom --save
// https://www.jianshu.com/p/47389e46449c
import { BrowserRouter as Router, Route } from "react-router-dom";

import Home from './../container/home';
import About from './../container/about';

// <Redirect path="/" to="/product" />
const router = () => {
    return (
        <Router basename="/react/">
            <Route path="/" component={Home} exact />
            <Route path="/home" component={Home} to="/home"/>
            <Route path="/about" component={About} to="/about"/>
        </Router>);
        
}

export default router;